package com.demo.auth.mapper;

import com.demo.auth.entity.User;
import com.demo.auth.enums.Role;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface UserMapper {
    User findByUsername(String username);
    void insertUser(User user);
    boolean existsByUsername(String username);
    List<User> findAllUsers();
    List<User> findUsersByRole(Role role);
    void updateUserRole(Long userId, Role role);
    void updateUserEnabled(Long userId, Boolean enabled);
}